#include <vector>
#include <ode/ode.h>

#include "World.hh"
#include "Renderable.hh"
#include "Touchable.hh"
#include "Path.hh"
#include "Camera.hh"

#include <GL/gl.h>
#include <GL/glu.h>

using namespace std;

Camera::Camera(){
  mX = 0;
  mY = 0;
  mZ = 0;

  mCenterX = 0;
  mCenterY = 0;
  mCenterZ = 0;

  mUpX = 0;
  mUpY = 0;
  mUpZ = 0;
}

Camera::Camera(double x, double y, double z, double centerx, double centery, double centerz, double upx, double upy, double upz){
  mX = x;
  mY = y;
  mZ = z;

  mCenterX = centerx;
  mCenterY = centery;
  mCenterZ = centerz;

  mUpX = upx;
  mUpY = upy;
  mUpZ = upz;
}

Camera&
Camera::operator=(const Camera& c){
  mX = c.mX;
  mY = c.mY;
  mZ = c.mZ;

  mCenterX = c.mCenterX;
  mCenterY = c.mCenterY;
  mCenterZ = c.mCenterZ;

  mUpX = c.mUpX;
  mUpY = c.mUpY;
  mUpZ = c.mUpZ;

  return *this;
} 

void 
Camera::Print(){
  cout <<   mX << " " <<  mY << " " << mZ << " - ";
  cout << mCenterX << " " <<  mCenterY << " " <<   mCenterZ << " - ";
  cout << mUpX << " " << mUpY << " " <<   mUpZ << endl;
}

void 
Camera::Use(){
  gluLookAt(mX, mY, mZ, mCenterX, mCenterY, mCenterZ, mUpX, mUpY, mUpZ);
}
 

Camera::~Camera(){
}
